package com.example.springdemo.others.a;

import java.util.concurrent.ConcurrentHashMap;

public class B implements A.interfaceA{


    @Override
    public void methodA() {
        System.out.println("我是来自B的methodA");
    }

    @Override
    public void methodB() {
        System.out.println("我是来自B的methodB");
    }

    public static void main(String[] args) {
        ConcurrentHashMap concurrentHashMapA = new ConcurrentHashMap();
        ConcurrentHashMap concurrentHashMapB = new ConcurrentHashMap();
        concurrentHashMapB.put("key1",1);
        concurrentHashMapB.put("key2",0);

        concurrentHashMapA.put("sfafas",concurrentHashMapB);
        System.out.println(concurrentHashMapA.toString());
        System.out.println(concurrentHashMapB.toString());
        concurrentHashMapB = new ConcurrentHashMap<>();
        concurrentHashMapB.put("key1",3);
        concurrentHashMapB.put("key2",4);
        concurrentHashMapA.put("sfafasfssafafs",concurrentHashMapB);
        System.out.println(concurrentHashMapA.toString());
    }



}
